1. Field of the Invention
The present invention relates to an image processing apparatus, an image processing method adopted by the image processing apparatus and an image processing program implementing the image processing method.
2. Description of the Related Art
In recent years, image information is treated by converting the image information into digital data and an image processing apparatus has been becoming popular as an apparatus which utilizes redundancy peculiar to the image information for the purpose of transmitting and storing the information with a high degree of efficiency.
In particular, an image processing apparatus has been becoming popular as an apparatus which conforms to a method such as the MPEG (Moving Picture Expert Group) method for compressing image information by carrying out a motion compensation process and an orthogonal transform process such as a DCT (Discrete Cosine Transform) process.
As typical codec specifications of this type, VC-1 specifications are known. In accordance with the VC-1 specifications, an integer transform process is adopted as a substitute for the DCT process with the floating point precision. In addition, in accordance with the VC-1 specifications, the so-called fraction precision pixel motion compensation is carried out as a compensation process in which, for each picture, the pixel precision of the motion vector can be set at a selectable value of ½ or ¼. By the way, in accordance with a method known as MPEG-4 Part 2, the pixel precision can be selected only for each stream. In this patent specification, the technical term ‘motion vector’ is abbreviated to MV in some cases.
In accordance with the MPEG4 method, the so-called median prediction process is carried out in order to allow the motion vector to be expressed by an even smaller code quantity. In the median prediction process, an intermediate value of adjacent motion vectors is taken as a predicted vector and, then, an error between the actual motion vector and the predicted vector is coded. The adjacent motion vectors are motion vectors for macroblocks (MBs) located at adjacent positions on the upper, upper right and left sides. In this patent specification, a macroblock is also referred to merely as a block and abbreviated to an MB in some cases.
If motion vectors having magnitudes and directions locally much different from each other appear in the median prediction process, the prediction process adversely results in a larger code quantity in some cases.
In accordance with the VC-1 specifications, the median prediction process is not carried out. Instead, a hybrid motion-vector prediction process is carried out. In the hybrid motion-vector prediction process, each of the adjacent motion vectors for macroblocks (MBs) located at adjacent positions on the upper and left sides is taken as a predicted value as it is and a macroblock MB to be used can be specified.
Then, in accordance with the VC-1 specifications, an IQ (Inverse Quantization) process and an IDCT (Inverse Discrete Cosine Transform) process carried out on macroblocks (MBs) in 1 slice (or 1 picture) are completed. Subsequently, after all macroblocks (MBs) in the same slice have been decoded, a deblocking process for reducing noises is carried out.
The deblocking process conforming to the VC-1 specifications is carried out by making use of a loop filter. In such a deblocking process, the loop filter computes an average of two pixel values on a block boundary as shown in a diagram of FIG. 1.
In the deblocking process, processing for a frame is carried out. In the case of an I, B or BI frame, the block size is set at a fixed value of 8×8 and all block boundaries are subjected to the deblocking process. In the case of a P frame, on the other hand, the block size has a variety of values such as 8×8, 8×4, 4×8 and 4×4 as shown in a diagram of FIG. 2 and the conditions for execution of the deblocking process are described as follows:    1: The block boundary shall be a boundary between blocks having non-zero intra coefficients.    2: The block shall have a difference in motion vector between adjacent blocks.
FIG. 3 is an explanatory diagram showing a model of a process to compute a difference in motion vector between blocks on a P frame. The motion-vector difference computation process is carried out to find a difference in motion-vector data between a current macroblock MBCUR and two macroblocks adjacent to the current macroblock MBCUR. To put it concretely, the two macroblocks adjacent to the current macroblock MBCUR are a macroblock MBABV at an adjacent location above the current macroblock MBCUR and a macroblock MBLF at an adjacent location on the left-hand side of the current macroblock MBCUR.
In the model diagram of FIG. 3, reference notation cur_mv is the motion-vector data of the current macroblock MBCUR, reference notation above_mv is the motion-vector data of the adjacent macroblock MBABV and reference notation left_mv is the motion-vector data of the adjacent macroblock MBLF.
During the motion-vector difference computation process, an access to a memory is made in an operation to acquire each piece of motion-vector data from the memory.
Japanese Patent Laid-open No. 2005-86830 proposes a technology for executing control in a bit stream as one of technologies of deblocking filters conforming to the VC-1 specifications.